<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateMessageTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('message', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name')->comment('留言人名称');
            $table->string('email')->comment('邮件')->nullable();
            $table->string('phone')->comment('电话')->nullable();
            $table->string('product')->comment('产品')->nullable();
            $table->string('message')->comment('留言信息');
            $table->string('ip')->comment('留言IP');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('message');
    }
}
